/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.boxin.ims.modules.wechat.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.boxin.ims.modules.wechat.entity.WechatBusiness;
import com.thinkgem.jeesite.common.persistence.BaseDao;
import com.thinkgem.jeesite.common.persistence.BaseDaoImpl;

/**
 * 微信业务DAO接口
 * @author Jakemanse
 * @version 2013-10-23
 */
public interface WechatBusinessDao extends WechatBusinessDaoCustom, CrudRepository<WechatBusiness, Long> {
	@Modifying
	@Query("delete from WechatBusiness  where id = ?1")
	public int deleteById(Long id);
	
	@Query(" from WechatBusiness where user_id= ?1 ")
	public WechatBusiness getByUserId(Long userId);
	
}

/**
 * DAO自定义接口
 * @author Jakemanse
 */
interface WechatBusinessDaoCustom extends BaseDao<WechatBusiness> {

}

/**
 * DAO自定义接口实现
 * @author Jakemanse
 */
@Component
class WechatBusinessDaoImpl extends BaseDaoImpl<WechatBusiness> implements WechatBusinessDaoCustom {

}
